package com.xiangge.domain;

// 创建继承父类person的子类
public class Actor extends Person{
    // 定义属性
    private String school;
    private String creation;

    // 定义行为,进行方法重写
    @Override
    public void introduction(){
        System.out.println("全名制作人们大家好，我是练习时长两年半的练习生"+getName()+"，今年"+getAge()+"岁");
        System.out.println("毕业于"+school+"，代表作《"+creation+"》");
        System.out.println("擅长唱、跳、rap、篮球");
        System.out.println("music！");
    }

    // 设置get和set方法，来调用私人属性
    public String getSchool() {
        return school;
    }

    public void setSchool(String school) {
        this.school = school;
    }

    public String getCreation() {
        return creation;
    }

    public void setCreation(String creation) {
        this.creation = creation;
    }

    // 创建无参构造方法和有参构造方法
    public Actor(){
    }
    public Actor(String name, int age, String sex, String school, String creation) {
        super(name, age, sex);
        this.school = school;
        this.creation = creation;
    }
}
